package task4;

import java.util.List;

public class StudentAdd {
    public static void add(List<Student> students, String id, String name, int age){
        Student student = new Student(id, name, age);
        if(!students.contains(student)){
            students.add(student);
            System.out.println("已插入学生信息：" + student);
        }else {
            System.out.println("已有该学生信息，建议使用修改功能");
        }
    }
}
